<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <p v-show="conditional ==  'ok' ">{{msg}}</p>
        <input v-model="msg" type="text" />
    </div>
    <div id="app1">
        <div>
        小明评级为：<span v-if="score >= 90">优秀</span>
        <span v-else-if="score >= 80">良好</span>
        <span v-else-if="score >= 60">及格</span>
        <span v-else>不及格</span>
     </div>
 </div>
 <div id="app2">
    <div>{{innerHtml}}</div>
    <div v-text="innerHtml"></div>
    <div v-html="innerHtml"></div>
</div>
<div id="app3">
    <!-- 完整写法 v-bind: -->
    <div v-bind:class="className">"{{innerHtml}}"</div>
    <!-- 缩写 : -->
    <div :class="className">"{{innerHtml}}"</div>
    <div v-text="innerHtml"></div>
    <div v-html="innerHtml"></div>
</div>
<div id="app4">
    <div>val的值:{{val}}</div>
    <div>val的值:{{val}}</div>
    <input v-model="val">
</div>
    <script src="./vue.js"></script>
    <script >
        let vue = new Vue({
            el:"#app",
            data:{
                msg:'今天企稳',
                conditional:'ok'
            }
        })
        let vue1 = new Vue({
        el:"#app1",
        data:{
            msg:'message',
            score:59,  
        },
    })
    let vue2 = new Vue({
        el:"#app2",
        data:{
            innerHtml:'<button>一个按钮</button>'
        }
    })
    new Vue({
        el:"#app3",
        data:{
            innerHtml:'<button>一个按钮</button>',
            className:'box'
        }
    })
    new Vue({
        el:"#app4",
        data:{
            val:'success'
        }
    })
    </script>
</body>

</html>
